<div ng-controller="StatisticCtrl as vm">
  <h1 class="page-title">发票统计</h1>
  <div class="well">
	<div class="form-horizontal" >
	  <fieldset>
	      <div class="control-group">
	        <!-- Text input-->
	      <label class="control-label">开票起始日期</label>
	      <div class="controls">
	        <input id="startDate" placeholder="搜索起始日期" class="laydate-icon" onclick="laydate()" >
	          <p class="help-block"></p>
	        </div>
	      </div>
	      <div class="control-group">
	        <!-- Search input-->
	        <label class="control-label">开票结束日期</label>
	        <div class="controls">
	          <input id="endDate" placeholder="搜索结束日期" class="laydate-icon" onclick="laydate()" >
	          <p class="help-block"></p>
	        </div>
	      </div>
	  </fieldset>
	  <div class="control-group">
	    <label class="control-label"></label>
	    <!-- Button -->
	    <div class="controls">
	      <a class="btn btn-primary" ng-click="vm.searchStats()">查询</a>
	    </div>
	  </div>
	</div>
	<p>按集团公司</p>
    <div class="table-responsive">
      <table class="table table-striped table-bordered">
        <thead>
          <tr>
            <th>公司</th>
            <th>金额</th>
            <th>运单数</th>
            <th>发票数</th>
          </tr>
        </thead>
        <tbody>
          <tr ng-repeat="stat in vm.groupStats">
          	<td ng-switch='stat.company'>
              <div ng-switch-when="DEPPON">德邦</div>
              <div ng-switch-when="JIAJI">佳吉</div>
              <div ng-switch-default>{{stat.company}}</div>
            </td>
            <td>{{stat.amount}}</td>
            <td>{{stat.orderCount}}</td>
            <td>{{stat.invoiceCount}}</td>
          </tr>
        </tbody>
      </table>
    </div>
    <p ng-show="vm.noGroupRecord">没有找到符合条件的数据！</p>
	<p>按分公司</p>
    <div class="table-responsive">
      <table class="table table-striped table-bordered">
        <thead>
          <tr>
            <th>公司</th>
            <th>金额</th>
            <th>运单数</th>
            <th>发票数</th>
          </tr>
        </thead>
        <tbody>
          <tr ng-repeat="stat in vm.companyStats">
          	<td>{{stat.company}}</td>
            <td>{{stat.amount}}</td>
            <td>{{stat.orderCount}}</td>
            <td>{{stat.invoiceCount}}</td>
          </tr>
        </tbody>
      </table>
    </div>
    <p ng-show="vm.noCompanyRecord">没有找到符合条件的数据！</p>
</div>
</div>